<?php
require_once 'SF/Init.php';
ini_set('date.timezone', 'Asia/Shanghai');
error_reporting(E_ALL & ~E_NOTICE);

define('ROOT_PATH', dirname(dirname(__FILE__)));
define('APP_HOME', ROOT_PATH .'/home');
define('APP_SHOP', ROOT_PATH .'/shop');
define('APP_ADMIN', ROOT_PATH .'/admin');
define('CONFIG_PATH', ROOT_PATH .'/config');
define('STATIC_PATH', ROOT_PATH .'/static');
define('INC_PATH', ROOT_PATH .'/includes');
define('UP_PATH', ROOT_PATH .'/uploads');
define('MODULE_PATH', ROOT_PATH .'/modules');

set_include_path(implode(PATH_SEPARATOR, array(
    realpath(ROOT_PATH . '/includes'),
    get_include_path(),
)));

require_once CONFIG_PATH .'/app.conf.php';
require_once INC_PATH .'/common.func.php';

\SF\Controller\Router::rewriteClose();
\SF\Session\Session::start();